from charmicat import Cut
from cmix.parameters import paramdef

cuts = [Cut(name='q_pik_2sig',
                 desc='Select events with Q off K-pi+ to be within ' + \
                     '2 sigma of 5.85 MeV',
                 pos_str='(abs(q_pik - Q_CENTROID) < 2*Q_SIGMA)',
                 condvars=paramdef,
                 ),
             Cut(name='m_pik_d0_2sig',
                 desc='Select events with M(K+pi-) within 2 sigma ' + \
                     'of the D0 mass',
                 pos_str='(abs(m_pik - D0_MASS) < 2*D0_SIGMA_MC)',
                 condvars=paramdef,
                 ),
             Cut(name='gteq2_svd_hits',
                 desc='Events with >=2 SVD hits in both z and rphi ' + \
                     'for both fast tracks',
                 pos_str= ' & '.join(['(km_svd_nhits_rphi > 1)',
                                      '(pip_svd_nhits_rphi > 1)',
                                      '(km_svd_nhits_z > 1)',
                                      '(pip_svd_nhits_z > 1)']),
                 latex=r'$N_{SVD} > 2$',
                 ),
             ]

